package com.pig4cloud.pig.demo.feign;

import com.pig4cloud.pig.common.core.constant.SecurityConstants;
import com.pig4cloud.pig.common.core.util.R;
import com.pig4cloud.pig.demo.dto.XlmUserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteXlmUserService", value = "demo-biz")
public interface RemoteXlmUserService {

    /**
     * @param id 查询id
     * @return xlmuser数据
     */
    @GetMapping("/xlmuser/{id}")
    R<XlmUserInfo> getById(@PathVariable("id") Integer id);

    /**
     * 新增用户信息
     *
     * @param xlmUser 用户记录
     * @return R
     */
    @PostMapping("/xlmuser")
    R<Boolean> save(@RequestBody XlmUserInfo xlmUser, @RequestHeader(SecurityConstants.FROM) String from);
}
